{% extends "basic.html" %}
{% block mainbody %}
{% load mytags %}
<form id="form1" class="form-horizontal" role="form" method="POST" action="/assets/editpost/" style="padding-bottom:100px;">
  {% csrf_token %}
  
  <input type="hidden" name="id" value="{{ info.id }}"/>
  
  <div class="form-group">
    <label for="firstname" class="col-sm-2 control-label">项目编号</label>
    <div class="col-sm-10">
      <h5>{{ info.pro_num }}</h5>
    </div>
  </div>
  <div class="form-group">
    <label for="firstname" class="col-sm-2 control-label">资产名称</label>
    <div class="col-sm-10">
      <h5>{{ info.assets_name }}</h5>
    </div>
  </div>
  <div class="form-group">
    <label for="firstname" class="col-sm-2 control-label">金融机构名称</label>
    <div class="col-sm-10">
      <h5>{{ info.financial_institutions }}</h5>
    </div>
  </div>
  <div class="form-group">
    <label for="firstname" class="col-sm-2 control-label">打款时间</label>
    <div class="col-sm-10">
      <h5>{{ info.payment_dt|timestampToDatetime }}</h5>
    </div>
  </div>
  <div class="form-group">
    <label for="firstname" class="col-sm-2 control-label">起息时间</label>
    <div class="col-sm-10">
      <h5>{{ info.interest_dt|timestampToDatetime }}</h5>
    </div>
  </div>
  
  
  <div class="form-group">
    <label for="firstname" class="col-sm-2 control-label">到期时间</label>
    <div class="col-sm-10">
      <h5>{{ info.exp_dt|timestampToDatetime }}</h5>
    </div>
  </div>
  <div class="form-group">
    <label for="firstname" class="col-sm-2 control-label">还款时滞</label>
    <div class="col-sm-10">
      <h5>{{ info.overdue_days }}天</h5>
    </div>
  </div>
  <div class="form-group">
    <label for="firstname" class="col-sm-2 control-label">还款时滞原因</label>
    <div class="col-sm-10">
      <h5>{{ info.overdue_reason }}</h5>
    </div>
  </div>
  <div class="form-group">
    <label for="firstname" class="col-sm-2 control-label">期限</label>
    <div class="col-sm-10">
      <h5>{{ info.duration }}天</h5>
    </div>
  </div>
  <div class="form-group">
    <label for="firstname" class="col-sm-2 control-label">借款人</label>
    <div class="col-sm-10">
      <h5>{{ info.borrower }}</h5>
    </div>
  </div>
  
  <div class="form-group">
    <label for="firstname" class="col-sm-2 control-label">借款人帐户</label>
    <div class="col-sm-10">
      <h5>{{ info.borrower_accounts }}</h5>
    </div>
  </div>
  <div class="form-group">
    <label for="firstname" class="col-sm-2 control-label">开户行</label>
    <div class="col-sm-10">
      <h5>{{ info.bank }}</h5>
    </div>
  </div>
  <div class="form-group">
    <label for="firstname" class="col-sm-2 control-label">资产本金</label>
    <div class="col-sm-10">
      <h5>{{ info.capital }}元</h5>
    </div>
  </div>
  <div class="form-group">
    <label for="firstname" class="col-sm-2 control-label">合同收益率</label>
    <div class="col-sm-10">
      <h5>{{ info.contract_yield }}%</h5>
    </div>
  </div>
  <div class="form-group">
    <label for="firstname" class="col-sm-2 control-label">总收益率</label>
    <div class="col-sm-10">
      <h5>{{ info.total_yield }}%</h5>
    </div>
  </div>
  
  <div class="form-group">
    <label for="firstname" class="col-sm-2 control-label">合同收益</label>
    <div class="col-sm-10">
      <h5>{{ info.contract_revenue }}元</h5>
    </div>
  </div>
  <div class="form-group">
    <label for="firstname" class="col-sm-2 control-label">佣金补贴</label>
    <div class="col-sm-10">
      <h5>{{ info.commission }}元</h5>
    </div>
  </div>
  <div class="form-group">
    <label for="firstname" class="col-sm-2 control-label">总收益</label>
    <div class="col-sm-10">
      <h5>{{ info.total_revenue }}元</h5>
    </div>
  </div>
  <div class="form-group">
    <label for="firstname" class="col-sm-2 control-label">是否在选择列表显示</label>
    <div class="col-sm-10">
      <h5>{{ info.is_show|whetherornotToText }}</h5>
    </div>
  </div>
  <div class="form-group">
    <label for="firstname" class="col-sm-2 control-label">项目详情</label>
    <div class="col-sm-10">
      <h5>{{ info.pro_details|safe }}</h5>
    </div>
  </div>
  
  <div class="form-group">
    <label for="firstname" class="col-sm-2 control-label">风险措控</label>
    <div class="col-sm-10">
      <h5>{{ info.pro_risk|safe }}</h5>
    </div>
  </div>
  
  
  
</form>
<script type="text/javascript">
$(document).ready(function(){
  //return true;
  $("#form1").submit(function(){
    var data=$(this).serialize();
    var url=$(this).attr("action");
    var tips=art.dialog.tips("正在提交……");
    
    $.ajax({
      async:false,
      type:'POST',
      url:url,
      data:data,
      success:function(rsObj){
        if(rsObj.response_code=="1"){
          art.dialog({
            content:rsObj.response_message,
            cancelVal:'继续修改',
            cancel:function(){
              tips.close();
            },
            okVal:'返回列表',
            ok:function(){
              javascript:window.history.go(-1);
            }
          });
        }else{
          art.dialog.alert(rsObj.response_message);
        }
      },
      cache:false
    });
    return false;
  });
});
</script>
{% endblock %}